<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../header.jsp"%>
<%@ include file="../taglibs.jsp"%>
<div>
	<div id="center">
		<div class="content">
			<table>
				<tr>
					<td>
						<blockquote>
							<h2>${topBlog.title}</h2>
							<div class="entry">
								${topBlog.content}
								<p class="posted">${topBlog.getCreatedTimeStr()}</p>
							</div>
						</blockquote> 
						<c:forEach items="${bcom}" var="com" varStatus="s">
							<blockquote>
								<h6>来自${com.userName}的评论：</h6>
								${com.content}
								<p class="posted"></p>

							</blockquote>
						</c:forEach>
					</td>
				</tr>
				<tr>
					<td>
						<form method="post"
							action="<%=basePath%>blog.do?save_com&id=${topBlog.id}%>">
							<table id="tab">
								<tr>
									<td>评论人：</td>
									<td><label> <input name="comname" type="text"
											id="comname" size="20" /> </label></td>
								</tr>
								<tr>
									<td>内容：</td>
									<td><label> <textarea name="comcon" cols="50"
												rows="10" id="comcon"></textarea> </label></td>
								</tr>
								<tr>
									<td><label> <input type="submit" name="button"
											id="button" value="提交" /> </label></td>
									<td>&nbsp;</td>
								</tr>
							</table>
						</form></td>
				</tr>
			</table>
		</div>
	</div>
	<div id="right">
		<div class="sidebar">
			<ul>
				<img src="<%=basePath%><%=usr.getPhoto()%>" />
				<a style="text-align: center"
					href="<%=basePath%>album.do?goto_change_photo">修改头像</a>
			</ul>
			<h2>博文分类</h2>
			<ul>
				<li><a href="<%=basePath%>blog.do?blogdetails">全部</a>
				</li>

				<c:forEach items="${categorys}" var="category" varStatus="s">
					<li><a
						href="<%=basePath%>blog.do?cate_blogs&cid=${categorys.id}%>">${categorys.name}</a>
					</li>
				</c:forEach>

			</ul>
			<h2>最新文章</h2>
			<ul>
				<c:forEach items="${blogs}" var="b" varStatus="s">
					<li><a href="<%=basePath%>blog.do?pre_next&id=${b.id}">${b.name}</a>
					</li>
				</c:forEach>
			</ul>
			<h2>最新评论</h2>
			<ul>
				<c:forEach items="${comments}" var="c" varStatus="s">
					<li><a href="<%=basePath%>blog.do?pre_next&id=${c.blogId}">${c.content}</a>
					</li>
				</c:forEach>
			</ul>
		</div>
	</div>
</div>

<%@include file="../footer.jsp"%>
